﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMTC.Model.Domain;
using SMTC.Dao.Plan;

namespace SMTC.WebCommon.Control
{
    public class VersionDropDown:System.Web.UI.WebControls.DropDownList
    {
        private PlanProcessDao _dao = new PlanProcessDao();
        protected override void OnLoad(EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                List<PlanVersionDomain> list = _dao.GetPlanVersionListDesc();
                DataSource = list;
                DataTextField = "PlanVersion";
                DataValueField = "PlanVersion";
                this.DataBind();
            }
            base.OnLoad(e);
        }
    }
}
